package tv.dyndns.kishibe.client.chat;

import tv.dyndns.kishibe.client.packet.PacketChatData;

import com.google.gwt.user.cellview.client.CellList;
import com.google.gwt.view.client.AbstractDataProvider;
import com.google.gwt.view.client.ProvidesKey;

public class CellListChatLog extends CellList<PacketChatData> {
	private static final int rowCount = 100;
	private static final ProvidesKey<PacketChatData> providesKey = new ProvidesKey<PacketChatData>() {
		@Override
		public Object getKey(PacketChatData item) {
			return item.resId;
		}
	};

	public CellListChatLog(AbstractDataProvider<PacketChatData> dataProvider) {
		super(new CellChatLog(), providesKey);
		setRowCount(rowCount);
		dataProvider.addDataDisplay(this);
	}
}
